File Select

See also: User Interface

 

The File Select feature allows a filename to be selected from a Removable Media Object for Canvas and stored a variable of USINTClosed Unsigned Short Integer - [Data Type USINT] - An 8-bit unsigned value. Unsigned Short Integers are used where the value of the data is expected to be in the range of 0 (zero) to 255. with an array size of 75 or 16-bit registers. This stored filename may then be used in conjunction with the Removable Media function blocks to perform operations such as reading the selected file.

 

Configuring File Select Function

Project Navigator > User Interface [right-click] > Configure > File Select

Register/Array Element

For Advanced ladder Logic: 

For Variable Based Advanced Ladder and IEC61131 Editors:

This specifies the starting register/array element of a contiguous group of 75, 16-bit register/array elements that, after file selection, contains both the length (16-bit register/array element) and the complete ASCIIClosed ASCII - American Standard Code for Information Interchange - ASCII-coded characters are single-byte values in the range of 0 (zero) to 127. Codes in the range 128 to 255 are not defined by the ASCII standard, but rather by the equipment manufacturer. file path of the selected filename. Seventy-five (75) consecutive register/array elements are reserved in this memory space for the maximum length pathname.

Register/Array Element

Description

Register/Array Element n

Filename length

Register/Array element n+1 to n+74

Filename full path (Max: 148 ASCII Characters)

The configured registers/array elements may be used as a filename parameter for Removable Media function blocks with the exception that the function block parameter must be the (starting register/array element + 1) reference since the function blocks do not use the length prefix.

Name: Allows controller register selection by alias name.

Operation: The starting register/array element contains the length of the file path that is contained in the following register/array elements. Length is specified in characters and does not include the NULLClosed Null Termination - To place a NULL character (character code 0) at the end of ASCII data. Some functions require NULL Termination to be able to determine the end point of the ASCII data since that data may vary in length from one time to the next. (byte containing zero) terminator placed at the end of the string. The file path is stored with two characters per 16-bit register/array element. If the selected file path contains less than the maximum characters, the unused register/array elements are NOT filled past the NULL byte.

When the filename is selected from the Removable Media directory, the complete transfer of the file path may take several PLC scans and requires a sequence for determining completion. The suggested sequence is to utilize ladder logic to monitor the length indication in the starting register/array element.

Before allowing selection of a filename, ladder logic should clear the starting register to zero. Once selection occurs and transfer is completed, the size of the file path is placed in the starting register/array element. A ladder logic compare object may be used to compare the starting register/array element value against zero. Once the values are determined to be NOT equal, the following register/array elements contain the file path and power flow may be used to activate a corresponding Removable Media function block.

Return to the Top: File Select